<template>
  <div>
    <!-- 子交易图标 -->
    <div v-show="$route.name === 'reportLoss'" class="bankContainer mt10">
      <el-row>
        <el-col v-for="(item,index) in listData" v-if="item.show" :key="index" class="txt-center mb20" :span="12">
          <div class="grid-content bg-purple">
            <router-link :to="{name: item.routerName}">
              <div :class="[item.imgClass, 'commonIcon']" />
              <span>{{ item.name }}</span>
            </router-link>
          </div>
        </el-col>
      </el-row>
    </div>
    <!-- 子模块路由展示 -->
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" />
  </div>
</template>
<script>
import Axios from 'axios'

export default {
  data() {
    return {
      listData: []
    }
  },
  created() {
    // this.bankNameFn()
    this.lossParmasModule()
  },
  methods: {
    // 模块参数化配置
    lossParmasModule() {
      //        Axios.post('/api/params').then((res) => {
      //          console.log(res)
      //          console.log(res.data)
      //          this.listData = res.data.lose
      //        }).catch((err) => {
      //          console.log(err)
      //        })
      this.listData = window.lossOptions.routerQuery
      console.log('loss router query array is: ' + JSON.stringify(this.listData))
    }
  }
}
</script>
<style scoped>
  img {
    width: 70px;
    height: 70px;
  }
</style>
